import { request } from "../utils/request.js";
export default {
  login: async ({ username, password }) =>
    await request({
      type: "GET",
      data: { username, password },
      url: "/api/admins/login",
    }),
  reg: async ({ username, password }) =>
    await request({
      type: "POST",
      data: { username, password },
      url: "/api/admins/reg",
    }),
    setToken:token=>(localStorage["_t"]=token),
    getToken:()=>(localStorage["_t"]),

};